package com.csjy.migration.hnnd.workflow;

import com.csjy.migration.hnnd.DbUtil;
import com.csjy.migration.hnnd.ProgramArgument;
import com.csjy.migration.hnnd.annotation.Task;
import com.csjy.migration.hnnd.business.SourceBusinessData;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * 合同文件审批
 */
public class ItemLawfileSubmitHny extends WorkflowMigration {

    public ItemLawfileSubmitHny(DbUtil sourceDbUtil, DbUtil targetDbUtil, SourceBusinessData sourceData, ProgramArgument programArgument, String projectId, String procInstId, Map procInstRow) throws Exception {
        super(sourceDbUtil, targetDbUtil, sourceData, programArgument, projectId, procInstId, procInstRow);
        this.customInitData();
    }

    @Override
    public void customInitData() throws SQLException {
        this.curBizType = "htsp";
    }

    @Override
    public void customInsertOrUpdateData() throws SQLException {

    }

    @Task("合同文件审批@责任人提交文件")
    public void htwjspzrrtjwj() throws Exception {

        // 附件列表
        this.curAffixTypeCommon = "zrrtjwj";
        // 审批结果
        this.curModelMap.put("all", new String[]{"task1561105043289xyb","下一步"});
        this.setCommonData(false,null);
        this.curCustomData.put("contract_checker", this.curProcessData.get("next_step_user"));

    }

    @Task("合同文件审批@法务人员审核")
    public void htwjspfwrysh() throws Exception {

        this.curModelMap.put("通过审核", new String[]{"task1561105045176xyb","下一步"});

        this.setCommonData(false,null);

    }

    @Task("合同文件审批@责任人接收文件")
    public void htwjspzrrjswj() throws Exception {

        // 审批结果
        this.curModelMap.put("all", new String[]{"endjs","结束"});
        this.setCommonData(false,null);
    }
}
